<template>
  <div class="child">
    <h3>子组件2</h3>
    <h4>电脑：{{ computer }}</h4>
    <h4>书籍：{{ book }}-{{ count }}本</h4>
  </div>
</template>

<script setup lang="ts" name="Child">
import { ref } from "vue";
let computer = ref("华为笔记本");
let book = ref("《费曼学习法》");
let count = ref(20);
//defineExpose表示把数据暴露出去给外面
defineExpose({ computer, book, count });
</script>

<style scoped>
.child {
  background-color: skyblue;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 0 10px black;
}
</style>
